package com.lanzhou.yuanfen.config;

import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;


/**
 * @author Administrator
 */
@Component("myKeyGenerator")
public class MyKeyGenerator implements KeyGenerator {

    private static final String CACHE_SUFFIX = "yf";

    @Override
    public Object generate(Object target, Method method, Object... params) {
        // 默认加上后缀: key->key::yf
        return CACHE_SUFFIX;
    }
}
